package com.mingqijia.gassafety.shared.constant;

public enum PhoneTypeEnum {

    TYPE_0("asst_0", "户主手机号"),
    TYPE_1("asst_1", "备用手机号1"),
    TYPE_2("asst_2", "备用手机号2"),
    TYPE_3("asst_3", "备用手机号3"),
    TYPE_4("asst_4", "备用手机号4"),
    TYPE_5("asst_5", "备用手机号5");
    PhoneTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private static final PhoneTypeEnum[] VALUES = PhoneTypeEnum.values();

    public static PhoneTypeEnum matcher(String value) {
        for (PhoneTypeEnum ele : VALUES) {
            if (ele.code.equals(value) ) {
                return ele;
            }
        }
        return PhoneTypeEnum.TYPE_0;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private String code;
    private String msg;
}
